home *** CD-ROM | disk | FTP | other *** search
/ Software of the Month Club 2000 October / Software of the Month - Ultimate Collection Shareware 277.iso / pc / PROGRAMS / UTILITY / WINLINUX / DATA1.CAB / programs_-_include / ASM-ALPH.{_4 / HWRPB.H < prev    next >
C/C++ Source or Header  |  1999-09-17  |  6KB  |  204 lines

  1. #ifndef __ALPHA_HWRPB_H
  2. #define __ALPHA_HWRPB_H
  3.  
  4. #define INIT_HWRPB ((struct hwrpb_struct *) 0x10000000)
  5.  
  6. /*
  7.  * DEC processor types for Alpha systems.  Found in HWRPB.
  8.  * These values are architected.
  9.  */
  10.  
  11. #define EV3_CPU                 1       /* EV3                  */
  12. #define EV4_CPU                 2       /* EV4 (21064)          */
  13. #define LCA4_CPU                4       /* LCA4 (21066/21068)   */
  14. #define EV5_CPU                 5       /* EV5 (21164)          */
  15. #define EV45_CPU                6       /* EV4.5 (21064/xxx)    */
  16. #define EV56_CPU        7    /* EV5.6 (21164)    */
  17. #define EV6_CPU            8    /* EV6 (21164)        */
  18. #define PCA56_CPU        9    /* PCA56 (21164PC)    */
  19. #define PCA57_CPU        10    /* PCA57 (21164??)    */
  20.  
  21. /*
  22.  * DEC system types for Alpha systems.  Found in HWRPB.
  23.  * These values are architected.
  24.  */
  25.  
  26. #define ST_ADU              1    /* Alpha ADU systype    */
  27. #define ST_DEC_4000          2    /* Cobra systype    */
  28. #define ST_DEC_7000          3    /* Ruby systype        */
  29. #define ST_DEC_3000_500          4    /* Flamingo systype    */
  30. #define ST_DEC_2000_300          6    /* Jensen systype    */
  31. #define ST_DEC_3000_300          7    /* Pelican systype    */
  32. #define ST_DEC_2100_A500      9    /* Sable systype    */
  33. #define ST_DEC_AXPVME_64     10    /* AXPvme system type    */
  34. #define ST_DEC_AXPPCI_33     11    /* NoName system type    */
  35. #define ST_DEC_TLASER         12    /* Turbolaser systype    */
  36. #define ST_DEC_2100_A50         13    /* Avanti systype    */
  37. #define ST_DEC_MUSTANG         14    /* Mustang systype    */
  38. #define ST_DEC_ALCOR         15    /* Alcor (EV5) systype    */
  39. #define ST_DEC_1000         17    /* Mikasa systype    */
  40. #define ST_DEC_EB64         18    /* EB64 systype        */
  41. #define ST_DEC_EB66         19    /* EB66 systype        */
  42. #define ST_DEC_EB64P         20    /* EB64+ systype    */
  43. #define ST_DEC_BURNS         21    /* laptop systype    */
  44. #define ST_DEC_RAWHIDE         22    /* Rawhide systype    */
  45. #define ST_DEC_K2         23    /* K2 systype        */
  46. #define ST_DEC_LYNX         24    /* Lynx systype        */
  47. #define ST_DEC_XL         25    /* Alpha XL systype    */
  48. #define ST_DEC_EB164         26    /* EB164 systype    */
  49. #define ST_DEC_NORITAKE         27    /* Noritake systype    */
  50. #define ST_DEC_CORTEX         28    /* Cortex systype    */
  51. #define ST_DEC_MIATA         30    /* Miata systype        */
  52. #define ST_DEC_XXM         31    /* XXM systype        */
  53. #define ST_DEC_TAKARA         32    /* Takara systype    */
  54. #define ST_DEC_YUKON         33    /* Yukon systype    */
  55. #define ST_DEC_TSUNAMI         34    /* Tsunami systype    */
  56. #define ST_DEC_WILDFIRE         35    /* Wildfire systype    */
  57. #define ST_DEC_CUSCO         36    /* CUSCO systype    */
  58.  
  59. /* UNOFFICIAL!!! */
  60. #define ST_UNOFFICIAL_BIAS    100
  61. #define ST_DTI_RUFFIAN        101    /* RUFFIAN systype    */
  62.  
  63. struct pcb_struct {
  64.     unsigned long ksp;
  65.     unsigned long usp;
  66.     unsigned long ptbr;
  67.     unsigned int pcc;
  68.     unsigned int asn;
  69.     unsigned long unique;
  70.     unsigned long flags;
  71.     unsigned long res1, res2;
  72. };
  73.  
  74. struct percpu_struct {
  75.     unsigned long hwpcb[16];
  76.     unsigned long flags;
  77.     unsigned long pal_mem_size;
  78.     unsigned long pal_scratch_size;
  79.     unsigned long pal_mem_pa;
  80.     unsigned long pal_scratch_pa;
  81.     unsigned long pal_revision;
  82.     unsigned long type;
  83.     unsigned long variation;
  84.     unsigned long revision;
  85.     unsigned long serial_no[2];
  86.     unsigned long logout_area_pa;
  87.     unsigned long logout_area_len;
  88.     unsigned long halt_PCBB;
  89.     unsigned long halt_PC;
  90.     unsigned long halt_PS;
  91.     unsigned long halt_arg;
  92.     unsigned long halt_ra;
  93.     unsigned long halt_pv;
  94.     unsigned long halt_reason;
  95.     unsigned long res;
  96.     unsigned long ipc_buffer[21];
  97.     unsigned long palcode_avail[16];
  98.     unsigned long compatibility;
  99. };
  100.  
  101. struct procdesc_struct {
  102.     unsigned long weird_vms_stuff;
  103.     unsigned long address;
  104. };
  105.  
  106. struct vf_map_struct {
  107.     unsigned long va;
  108.     unsigned long pa;
  109.     unsigned long count;
  110. };
  111.  
  112. struct crb_struct {
  113.     struct procdesc_struct * dispatch_va;
  114.     struct procdesc_struct * dispatch_pa;
  115.     struct procdesc_struct * fixup_va;
  116.     struct procdesc_struct * fixup_pa;
  117.     /* virtual->physical map */
  118.     unsigned long map_entries;
  119.     unsigned long map_pages;
  120.     struct vf_map_struct map[1];
  121. };
  122.  
  123. struct memclust_struct {
  124.     unsigned long start_pfn;
  125.     unsigned long numpages;
  126.     unsigned long numtested;
  127.     unsigned long bitmap_va;
  128.     unsigned long bitmap_pa;
  129.     unsigned long bitmap_chksum;
  130.     unsigned long usage;
  131. };
  132.  
  133. struct memdesc_struct {
  134.     unsigned long chksum;
  135.     unsigned long optional_pa;
  136.     unsigned long numclusters;
  137.     struct memclust_struct cluster[0];
  138. };
  139.  
  140. struct dsr_struct {
  141.     long smm;            /* SMM nubber used by LMF       */
  142.     unsigned long  lurt_off;    /* offset to LURT table         */
  143.     unsigned long  sysname_off;    /* offset to sysname char count */
  144. };
  145.  
  146. struct hwrpb_struct {
  147.     unsigned long phys_addr;    /* check: physical address of the hwrpb */
  148.     unsigned long id;        /* check: "HWRPB\0\0\0" */
  149.     unsigned long revision;    
  150.     unsigned long size;        /* size of hwrpb */
  151.     unsigned long cpuid;
  152.     unsigned long pagesize;        /* 8192, I hope */
  153.     unsigned long pa_bits;        /* number of physical address bits */
  154.     unsigned long max_asn;
  155.     unsigned char ssn[16];        /* system serial number: big bother is watching */
  156.     unsigned long sys_type;
  157.     unsigned long sys_variation;
  158.     unsigned long sys_revision;
  159.     unsigned long intr_freq;    /* interval clock frequency * 4096 */
  160.     unsigned long cycle_freq;    /* cycle counter frequency */
  161.     unsigned long vptb;        /* Virtual Page Table Base address */
  162.     unsigned long res1;
  163.     unsigned long tbhb_offset;    /* Translation Buffer Hint Block */
  164.     unsigned long nr_processors;
  165.     unsigned long processor_size;
  166.     unsigned long processor_offset;
  167.     unsigned long ctb_nr;
  168.     unsigned long ctb_size;        /* console terminal block size */
  169.     unsigned long ctbt_offset;    /* console terminal block table offset */
  170.     unsigned long crb_offset;    /* console callback routine block */
  171.     unsigned long mddt_offset;    /* memory data descriptor table */
  172.     unsigned long cdb_offset;    /* configuration data block (or NULL) */
  173.     unsigned long frut_offset;    /* FRU table (or NULL) */
  174.     void (*save_terminal)(unsigned long);
  175.     unsigned long save_terminal_data;
  176.     void (*restore_terminal)(unsigned long);
  177.     unsigned long restore_terminal_data;
  178.     void (*CPU_restart)(unsigned long);
  179.     unsigned long CPU_restart_data;
  180.     unsigned long res2;
  181.     unsigned long res3;
  182.     unsigned long chksum;
  183.     unsigned long rxrdy;
  184.     unsigned long txrdy;
  185.     unsigned long dsr_offset;    /* "Dynamic System Recognition Data Block Table" */
  186. };
  187.  
  188. #ifdef __KERNEL__
  189.  
  190. extern struct hwrpb_struct *hwrpb;
  191.  
  192. static inline void
  193. hwrpb_update_checksum(struct hwrpb_struct *h)
  194. {
  195.     unsigned long sum = 0, *l;
  196.         for (l = (unsigned long *) h; l < (unsigned long *) &h->chksum; ++l)
  197.                 sum += *l;
  198.         h->chksum = sum;
  199. }
  200.  
  201. #endif /* __KERNEL__ */
  202.  
  203. #endif /* __ALPHA_HWRPB_H */
  204.